package com.yige.service;

import com.mongodb.DBObject;

import java.util.List;

/**
 * Created by sunhao on 2015/9/22 0022.
 */
public interface RoleService extends BasicMongoService {

    /**查找角色拥有资源*/
    List<DBObject> findAllResourceForRole(Object roleId);

    /**给角色绑定资源*/
    boolean bindResourceForRole(Object roleId, Object resourceId);

    /**给角色解除资源*/
    boolean removeResourceForRole(Object roleId, Object resourceId);

    /**修改角色资源*/
    boolean updateResourceForRole(Object roleId, List<DBObject> resources);

}
